/*
 * @Author: 刘凯欣
 * @Date: 2025-11-06 16:32:40
 * @LastEditors: 刘凯欣
 * @LastEditTime: 2025-11-07 09:12:27
 * @Description: 种子
 */
'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    /**
     * Add seed commands here.
     *
     * Example:
     * await queryInterface.bulkInsert('People', [{
     *   name: 'John Doe',
     *   isBetaMember: false
     * }], {});
    */

    const listData = [];
    const numberLoop = 100;
    for (let i = 0; i < numberLoop; i++) {
      listData.push({
        title: `文章${i + 1}`,
        content: `文章内容${i + 1}`,
        createdAt: new Date(),
        updatedAt: new Date()
      });
    }
    await queryInterface.bulkInsert('Articles',listData,{});
  },

  async down(queryInterface, Sequelize) {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */
  }
};
